#__Author__ = white
#学校。1.名字、地址、注册学生、雇佣老师

# 、老师、人的基本信息，薪水，所教课程,上课
# 学生，人的基本信息，学费，课程
#课程类
#
class School(object):
    def __init__(self,name,addr):
        self.name = name
        self.addr = addr
        self.students = []
        self.teachers = []
    def enroll(self,stu_obj):
        self.students.append(stu_obj)
        print("student %s have enrolled"%stu_obj.name)
    def hire(self,tea_obj):
        self.teachers.append(tea_obj)
        print("teacher %s have been hired"%tea_obj.name)

class People(object):
    def __init__(self,name,age,sex):
        self.name = name
        self.age = age
        self.sex = sex

class Teacher(People):
    def __init__(self,name,age,sex,salary,course):
        super(Teacher,self).__init__(name,age,sex)
        self.salary = salary
        self.course = course
        print('''
             --------Teacher %s--------
             name:%s
             age:%s
             sex:%s
             salary:%s
             course:%s
             ''' % (self.name, self.name, self.age, self.sex, self.salary, self.course))
    def give_lessons(self,course):
        print("teacher%s is giving lessons for students"%self.name)

class Student(People):
    def __init__(self,name,age,sex,tuition,course,student_id):
        super(Student,self).__init__(name,age,sex)
        self.tuition = tuition
        self.course = course
        self.student_id = student_id
        print('''
        --------student %s--------
        name:%s
        age:%s
        sex:%s
        tuition:%s
        course:%s
        student_id:%s
        '''%(self.name,self.name,self.age,self.sex,self.tuition,self.course,self.student_id))
    def pay_tuition(self):
        print("student %s is paying tuition %s "%(self.name,self.tuition))

school = School("okc","shenzhen")
student1 = Student("dty","22","M","5000","python","1001")
student1.pay_tuition()

school.enroll(student1)
teacher1 = Teacher("王晓婷","22","女","3000","语文")
teacher2 = Teacher("师国斌","43","男","6000","english")
school.hire(teacher1)
school.hire(teacher2)
print("现在有学生%s,老师%s"%(school.students[0].name,school.teachers[1].name))